package tg.webclient.rj.beans.cupm;

import java.rmi.RemoteException;
import java.sql.Date;
import java.util.Vector;

import psdi.app.location.LocationSetRemote;
import psdi.mbo.MboRemote;
import psdi.mbo.MboSetRemote;
import psdi.server.MXServer;
import psdi.util.MXException;
import psdi.webclient.system.beans.DataBean;
import psdi.webclient.system.controller.WebClientEvent;

public class cupmDataBean extends DataBean{
	  public void initialize() throws MXException, RemoteException
	  {
	    super.initialize();    
	  }
	  public int execute() throws MXException, RemoteException
	  {
		  WebClientEvent event = this.clientSession.getCurrentEvent();
		  
		  event.getWebClientSession().getCurrentApp().getResultsBean();
		  MboRemote thisMbo = null;
		  DataBean dd = app.getDataBean("setdate");
		  MboRemote ss = dd.getMbo();
		  String abb[] = dd.getAttributes();
		  String cccc[][] = dd.getDataAsArray(abb);
		  int j = dd.getPageRowCount();
		  int b = dd.getPageEndRow();
		  String aa = ss.getString("begindate1");
		  thisMbo = app.getAppBean().getMbo(0);
		  //thisMbo = (Cupm) this.app.getDataBean("setdate").getMbo();
		  java.util.Date enddate = thisMbo.getDate("enddate");
		  java.util.Date begindate = thisMbo.getDate("begindate1");
		  String cupmnum = thisMbo.getString("CUPMNUM");
		  MboSetRemote otherMboSet = thisMbo.getMboSet("CUPM");
		  java.util.Date begindate2 = otherMboSet.getMbo(0).getDate("begindate1");
	      DataBean resultsBean = this.app.getResultsBean();
	      if(!resultsBean.isEmpty()){
	    	  for(int i=0;i<resultsBean.count();i++){
		    	  Boolean selected = resultsBean.getMbo(i).isSelected();

		    	  System.out.println("selected = " + selected +"'");  

	    	  }

	      }
	    return 1;
	  }

}
